﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.ServiceModel;
using System.ServiceModel.Description;
using System.Text;
using System.Threading.Tasks;

namespace ObserverConsole
{
    class Program
    {
        static void Main(string[] args)
        {


            ServiceHost host = new ServiceHost(typeof(ObserverLib.Mailing));
            host.Open();
            foreach (ServiceEndpoint sep in host.Description.Endpoints)
            {
                Console.WriteLine("  endpoint {0} ({1})",
                                  sep.Address, sep.Binding.Name);
            }

            ServiceHost host2 = new ServiceHost(typeof(ObserverLib.Supervision));
            host2.Open();

            foreach (ServiceEndpoint sep in host2.Description.Endpoints)
            {
                Console.WriteLine("  endpoint {0} ({1})",
                                  sep.Address, sep.Binding.Name);
            }

                Console.ReadLine();

                host.Close();
            
        }
    }
}
